from sqlalchemy import String, Integer
from sqlalchemy.orm import Mapped, mapped_column

from lib.orm.Base import Base


class IPGoe(Base):
    __tablename__ = 'ipgoe'
    id: Mapped[int] = mapped_column(Integer, primary_key=True)
    ip = mapped_column(String(15), index=True, unique=True)
    countryCode: Mapped[str] = mapped_column(String(2))
    country: Mapped[str] = mapped_column(String(64))
    districts: Mapped[str] = mapped_column(String(16))
    city: Mapped[str] = mapped_column(String(16))
    province: Mapped[str] = mapped_column(String(16))
    isp: Mapped[str] = mapped_column(String(16))
